package com.bedrock.project.inside.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bedrock.project.inside.mapper.ProjectUserInfoMapper;
import com.bedrock.project.inside.entity.ProjectUserInfo;
import com.bedrock.project.inside.service.IProjectUserInfoService;

/**
 * 项目成员关联表Service业务层处理
 * 
 * @author bedrock
 * @date 2020-04-08
 */
@Service
public class ProjectUserInfoServiceImpl implements IProjectUserInfoService 
{
    @Autowired
    private ProjectUserInfoMapper projectUserInfoMapper;

    /**
     * 查询项目成员关联表
     * 
     * @param projectId 项目成员关联表ID
     * @return 项目成员关联表
     */
    @Override
    public List<ProjectUserInfo> selectProjectUserInfoById(Long projectId)
    {
        return projectUserInfoMapper.selectProjectUserInfoById(projectId);
    }

    /**
     * 查询项目成员关联表列表
     * 
     * @param projectUserInfo 项目成员关联表
     * @return 项目成员关联表
     */
    @Override
    public List<ProjectUserInfo> selectProjectUserInfoList(ProjectUserInfo projectUserInfo)
    {
        return projectUserInfoMapper.selectProjectUserInfoList(projectUserInfo);
    }

    /**
     * 新增项目成员关联表
     * 
     * @param projectUserInfo 项目成员关联表
     * @return 结果
     */
    @Override
    public int insertProjectUserInfo(ProjectUserInfo projectUserInfo)
    {
        return projectUserInfoMapper.insertProjectUserInfo(projectUserInfo);
    }

    /**
     * 修改项目成员关联表
     * 
     * @param projectUserInfo 项目成员关联表
     * @return 结果
     */
    @Override
    public int updateProjectUserInfo(ProjectUserInfo projectUserInfo)
    {
        return projectUserInfoMapper.updateProjectUserInfo(projectUserInfo);
    }

    /**
     * 批量删除项目成员关联表
     * 
     * @param projectIds 需要删除的项目成员关联表ID
     * @return 结果
     */
    @Override
    public int deleteProjectUserInfoByIds(Long[] projectIds)
    {
        return projectUserInfoMapper.deleteProjectUserInfoByIds(projectIds);
    }

    /**
     * 删除项目成员关联表信息
     * 
     * @param projectId 项目成员关联表ID
     * @return 结果
     */
    @Override
    public int deleteProjectUserInfoById(Long projectId)
    {
        return projectUserInfoMapper.deleteProjectUserInfoById(projectId);
    }
}
